load("@rules_java//java:defs.bzl", "java_library")

package(
    default_applicable_licenses = ["//:license"],
    default_visibility = [
        "//publish:__pkg__",
        "//validator:__pkg__",
    ],
)

java_library(
    name = "validator",
    srcs = [
        "CelValidatorFactory.java",
    ],
    tags = [
    ],
    deps = [
        ":validator_builder",
        ":validator_impl",
        "//bundle:cel",
        "//checker:checker_builder",
        "//compiler",
        "//compiler:compiler_builder",
        "//parser:parser_builder",
        "//runtime",
    ],
)

java_library(
    name = "validator_builder",
    srcs = [
        "CelValidator.java",
        "CelValidatorBuilder.java",
    ],
    tags = [
    ],
    deps = [
        ":ast_validator",
        "//common:cel_ast",
        "//common:compiler_common",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "validator_impl",
    srcs = [
        "CelValidatorImpl.java",
    ],
    tags = [
    ],
    deps = [
        ":ast_validator",
        ":validator_builder",
        "//bundle:cel",
        "//common:cel_ast",
        "//common:compiler_common",
        "//common/navigation",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "ast_validator",
    srcs = ["CelAstValidator.java"],
    tags = [
    ],
    deps = [
        "//bundle:cel",
        "//common:cel_source",
        "//common:compiler_common",
        "//common:source_location",
        "//common/navigation",
        "@maven//:com_google_guava_guava",
    ],
)
